Optimal. Leaf size=432 \[ -\frac {3 a b^2 F_1\left (\frac {1}{2};\frac {1}{2} (-1+n),3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^4(e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-1+n)}}{\left (a^2-b^2\right )^3 d^3 f}+\frac {b^3 F_1\left (\frac {1}{2};\frac {1}{2} (-2+n),3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^3(e+f x) \sin ^2(e+f x)^{n/2}}{\left (a^2-b^2\right )^3 d^3 f}+\frac {3 a^2 b F_1\left (\frac {1}{2};\frac {n}{2},3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^3(e+f x) \sin ^2(e+f x)^{n/2}}{\left (a^2-b^2\right )^3 d^3 f}-\frac {a^3 F_1\left (\frac {1}{2};\frac {1+n}{2},3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^2(e+f x)^{\frac {3+n}{2}}}{\left (a^2-b^2\right )^3 d^3 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.48, antiderivative size = 432, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3317, 3954,
2903, 3268, 440} \begin {gather*} -\frac {3 a b^2 \sin ^4(e+f x) \cos (e+f x) \sin ^2(e+f x)^{\frac {n-1}{2}} (d \csc (e+f x))^{n+3} F_1\left (\frac {1}{2};\frac {n-1}{2},3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right )}{d^3 f \left (a^2-b^2\right )^3}+\frac {3 a^2 b \sin ^3(e+f x) \cos (e+f x) \sin ^2(e+f x)^{n/2} (d \csc (e+f x))^{n+3} F_1\left (\frac {1}{2};\frac {n}{2},3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right )}{d^3 f \left (a^2-b^2\right )^3}+\frac {b^3 \sin ^3(e+f x) \cos (e+f x) \sin ^2(e+f x)^{n/2} (d \csc (e+f x))^{n+3} F_1\left (\frac {1}{2};\frac {n-2}{2},3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right )}{d^3 f \left (a^2-b^2\right )^3}-\frac {a^3 \cos (e+f x) \sin ^2(e+f x)^{\frac {n+3}{2}} (d \csc (e+f x))^{n+3} F_1\left (\frac {1}{2};\frac {n+1}{2},3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right )}{d^3 f \left (a^2-b^2\right )^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 440
Rule 2903
Rule 3268
Rule 3317
Rule 3954
Rubi steps
\begin {align*} \int \frac {(d \csc (e+f x))^n}{(a+b \sin (e+f x))^3} \, dx &=\frac {\int \frac {(d \csc (e+f x))^{3+n}}{(b+a \csc (e+f x))^3} \, dx}{d^3}\\ &=\frac {\left ((d \csc (e+f x))^{3+n} \sin ^{3+n}(e+f x)\right ) \int \frac {\sin ^{-n}(e+f x)}{(a+b \sin (e+f x))^3} \, dx}{d^3}\\ &=\frac {\left ((d \csc (e+f x))^{3+n} \sin ^{3+n}(e+f x)\right ) \int \left (-\frac {3 a^2 b \sin ^{1-n}(e+f x)}{\left (a^2-b^2 \sin ^2(e+f x)\right )^3}+\frac {3 a b^2 \sin ^{2-n}(e+f x)}{\left (a^2-b^2 \sin ^2(e+f x)\right )^3}+\frac {a^3 \sin ^{-n}(e+f x)}{\left (a^2-b^2 \sin ^2(e+f x)\right )^3}+\frac {b^3 \sin ^{3-n}(e+f x)}{\left (-a^2+b^2 \sin ^2(e+f x)\right )^3}\right ) \, dx}{d^3}\\ &=\frac {\left (a^3 (d \csc (e+f x))^{3+n} \sin ^{3+n}(e+f x)\right ) \int \frac {\sin ^{-n}(e+f x)}{\left (a^2-b^2 \sin ^2(e+f x)\right )^3} \, dx}{d^3}-\frac {\left (3 a^2 b (d \csc (e+f x))^{3+n} \sin ^{3+n}(e+f x)\right ) \int \frac {\sin ^{1-n}(e+f x)}{\left (a^2-b^2 \sin ^2(e+f x)\right )^3} \, dx}{d^3}+\frac {\left (3 a b^2 (d \csc (e+f x))^{3+n} \sin ^{3+n}(e+f x)\right ) \int \frac {\sin ^{2-n}(e+f x)}{\left (a^2-b^2 \sin ^2(e+f x)\right )^3} \, dx}{d^3}+\frac {\left (b^3 (d \csc (e+f x))^{3+n} \sin ^{3+n}(e+f x)\right ) \int \frac {\sin ^{3-n}(e+f x)}{\left (-a^2+b^2 \sin ^2(e+f x)\right )^3} \, dx}{d^3}\\ &=-\frac {\left (3 a b^2 (d \csc (e+f x))^{3+n} \sin ^{3+2 \left (\frac {1}{2}-\frac {n}{2}\right )+n}(e+f x) \sin ^2(e+f x)^{-\frac {1}{2}+\frac {n}{2}}\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1-n}{2}}}{\left (a^2-b^2+b^2 x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{d^3 f}-\frac {\left (a^3 (d \csc (e+f x))^{3+n} \sin ^{3+2 \left (-\frac {1}{2}-\frac {n}{2}\right )+n}(e+f x) \sin ^2(e+f x)^{\frac {1}{2}+\frac {n}{2}}\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {1}{2} (-1-n)}}{\left (a^2-b^2+b^2 x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{d^3 f}+\frac {\left (3 a^2 b (d \csc (e+f x))^{3+n} \sin ^3(e+f x) \sin ^2(e+f x)^{n/2}\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{-n/2}}{\left (a^2-b^2+b^2 x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{d^3 f}-\frac {\left (b^3 (d \csc (e+f x))^{3+n} \sin ^3(e+f x) \sin ^2(e+f x)^{n/2}\right ) \text {Subst}\left (\int \frac {\left (1-x^2\right )^{\frac {2-n}{2}}}{\left (-a^2+b^2-b^2 x^2\right )^3} \, dx,x,\cos (e+f x)\right )}{d^3 f}\\ &=-\frac {3 a b^2 F_1\left (\frac {1}{2};\frac {1}{2} (-1+n),3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^4(e+f x) \sin ^2(e+f x)^{\frac {1}{2} (-1+n)}}{\left (a^2-b^2\right )^3 d^3 f}+\frac {b^3 F_1\left (\frac {1}{2};\frac {1}{2} (-2+n),3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^3(e+f x) \sin ^2(e+f x)^{n/2}}{\left (a^2-b^2\right )^3 d^3 f}+\frac {3 a^2 b F_1\left (\frac {1}{2};\frac {n}{2},3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^3(e+f x) \sin ^2(e+f x)^{n/2}}{\left (a^2-b^2\right )^3 d^3 f}-\frac {a^3 F_1\left (\frac {1}{2};\frac {1+n}{2},3;\frac {3}{2};\cos ^2(e+f x),-\frac {b^2 \cos ^2(e+f x)}{a^2-b^2}\right ) \cos (e+f x) (d \csc (e+f x))^{3+n} \sin ^2(e+f x)^{1+\frac {1+n}{2}}}{\left (a^2-b^2\right )^3 d^3 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(2406\) vs. \(2(432)=864\).
time = 16.67, size = 2406, normalized size = 5.57 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.66, size = 0, normalized size = 0.00 \[\int \frac {\left (d \csc \left (f x +e \right )\right )^{n}}{\left (a +b \sin \left (f x +e \right )\right )^{3}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d \csc {\left (e + f x \right )}\right )^{n}}{\left (a + b \sin {\left (e + f x \right )}\right )^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (\frac {d}{\sin \left (e+f\,x\right )}\right )}^n}{{\left (a+b\,\sin \left (e+f\,x\right )\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________